<?php
return array(
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route' => '/',
                    'defaults' => array(
                        'controller' => 'Application\Controller\Index',
                        'action' => 'index',
                    ),
                ),
            ),
            // The following is a route to simplify getting started creating
            // new controllers and actions without needing to create a new
            // module. Simply drop new controllers in, and you can access them
            // using the path /cubemarketing/:controller/:action
            'foam' => array(
                'type' => 'Literal',
                'options' => array(
                    'route' => '/foam',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Foam\Controller',
                        'controller' => 'Index',
                        'action' => 'index', 
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'default' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/[:controller[/:action[/:id]]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'id' => '[0-9]+', 
                            ),
                            'defaults' => array(
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
    'service_manager' => array(
        'abstract_factories' => array(
            'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
            'Zend\Log\LoggerAbstractServiceFactory',
        ),
        'aliases' => array(
            'translator' => 'MvcTranslator',
        ),
    ),
    'translator' => array(
        'locale' => 'fr_FR',
        'translation_file_patterns' => array(
            array(
                'type' => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern' => '%s.mo',
            ),
        ),
    ),
    'controllers' => array(
        'invokables' => array(
            'Foam\Controller\Index' => 'Foam\Controller\IndexController',
            'Foam\Controller\Produit' => 'Foam\Controller\ProduitController',
            'Foam\Controller\Categorie' => 'Foam\Controller\CategorieController',
            'Foam\Controller\Famille' => 'Foam\Controller\FamilleController',
            'Foam\Controller\SousFamille' => 'Foam\Controller\SousFamilleController',
            'Foam\Controller\Gamme' => 'Foam\Controller\GammeController',
            'Foam\Controller\SousGamme' => 'Foam\Controller\SousGammeController',
            'Foam\Controller\Dlc' => 'Foam\Controller\DlcController',
            'Foam\Controller\Service' => 'Foam\Controller\ServiceController',
            'Foam\Controller\Contenant' => 'Foam\Controller\ContenantController',
            'Foam\Controller\Production' => 'Foam\Controller\ProductionController',
            'Foam\Controller\Allergene' => 'Foam\Controller\AllergeneController',
            'Foam\Controller\Tva' => 'Foam\Controller\TvaController',
            'Foam\Controller\Fournisseur' => 'Foam\Controller\FournisseurController',
            'Foam\Controller\Ingredient' => 'Foam\Controller\IngredientController',
            'Foam\Controller\FicheTechnique' => 'Foam\Controller\FicheTechniqueController',
            'Foam\Controller\Carte' => 'Foam\Controller\CarteController',
            'Foam\Controller\Tableaudebord' => 'Foam\Controller\TableaudebordController',
            'Foam\Controller\Synthese' => 'Foam\Controller\SyntheseController',
        ),
    ),
    'view_manager' => array(
        'template_map' => array(
            'layout/foam' => __DIR__ . '/../view/layout/foam.phtml',
            'layout/ajax' => __DIR__ . '/../view/layout/ajax.phtml',
            'foam/index/index' => __DIR__ . '/../view/foam/index/index.phtml',
            'error/404' => __DIR__ . '/../view/error/404.phtml',
            'error/index' => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            'foam' => __DIR__ . '/../view',
        ),
        'strategies' => array(
            'ViewJsonStrategy',
        ),
        'display_not_found_reason' => true,  
        'display_exceptions' => true,
    ),
);
